<?php

namespace Maestros\Model\Entity;

use Componentes\Model\Entity\GenericModel;

class Bloque extends GenericModel {

    protected $id;
    protected $_dia;
    protected $_hora;

    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }

    public function setId($idBloque) {
        $this->id = $idBloque;
    }

    public function getId() {
        return $this->id;
    }

    public function setDia($dia) {
        $this->_dia = $dia;
    }

    public function getDia() {
        return $this->_dia;
    }

    public function setHora($hora) {
        $this->_hora = $hora;
    }

    public function getHora() {
        return $this->_hora;
    }
    
    /**
     * Convierte un Objeto en un Array
     * @param    object  $object El objeto a convertir
     * @return  arreglo
     */
    public function objectToArray() {
        if (!is_object($this) && !is_array($this)) {
            return $this;
        }
        if (is_object($this)) {
            $array = array(
                'id' => $this->id,
                '_dia' => $this->_dia,
                '_hora' => $this->_hora
            );
        }
        return $array;
    }

    }
?>